package com.blackhorse.bean;

import org.springframework.context.annotation.Bean;

//这个类上没有Spring配置注解，默认User对象不会被放入IOC容器

public class UserConfiguration {
    @Bean
    public User createUser(){
        User user =  new User();
        user.setUsername("张三");
        user.setAge(12);
        return user;
    }
}
